package com.woniu.config;

import cn.hutool.captcha.CaptchaUtil;
import cn.hutool.captcha.LineCaptcha;
import cn.hutool.core.lang.Snowflake;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.util.HashMap;

@Configuration
public class CaptchaConfig {
    @Bean
    public LineCaptcha lineCaptcha() {
        return CaptchaUtil.createLineCaptcha(210, 90);
    }

    @Bean
    public Snowflake snowflake() {
        return new Snowflake();
    }

    //暂时替代redis的替代方案
    @Bean
    public HashMap<String, String> hashMap() {
        return new HashMap<>(16);
    }


}
